package com.train.mgr.config.thread;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadPoolProperties {
    /**
     * 核心数
     */
    private Integer corePoolSize = Integer.max(Runtime.getRuntime().availableProcessors(), 10);

    /**
     * 最大数
     */
    private Integer maximumPoolSize = 200;
    /**
     * 保持存活时间
     */
    private Integer keepAliveTime = 20;
    /**
     * 队列容量
     */
    private Integer capacity = 2000;

    private String threadNamePrefix = "ThreadPoolTaskExecutor-";

}
